#include "Task.hpp"
#include "ThreadPool.hpp"
#include <ctime>

int main()
{
    srand((unsigned int)time(nullptr));
    // ThreadPool<Task>* tp = new ThreadPool<Task>();
    // tp->Start();
    ThreadPool<Task>::GetInstance()->Start();
    while(true) {
        int x = rand() % 50;
        int y = rand() % 10;
        char op = opStr[rand() % 4];
        Task t(x, y, op);
        // tp->Push(t);
        ThreadPool<Task>::GetInstance()->Push(t);
        printf("Main thread make task, %s\n", t.GetTask().c_str());
        sleep(1);
    }
    return 0;
} 